package cisdi.mes.sm.rm.web;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

//该类的主要职责负责主页面跳转
@Controller
public class MenuCtl {
	
	// 菜单：要料申请
	@RequestMapping("/sm/rm/MenuCtl/requestMatPage")
	public ModelAndView requestMatPage(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		// 获取输入
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：直供收货
	@RequestMapping("/sm/rm/MenuCtl/zgReceive")
	public ModelAndView zgReceive(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：收货（配送、调拨）
	@RequestMapping("/sm/rm/MenuCtl/matReceive")
	public ModelAndView matReceive(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：收货录入
	@RequestMapping("/sm/rm/MenuCtl/matRcvInput")
	public ModelAndView matRcvInput(HttpServletRequest request) {
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：质检成分管理
	@RequestMapping("/sm/rm/MenuCtl/matQualityMgr-Main")
	public ModelAndView qualityMgr(HttpServletRequest request) {
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：原料入库
	@RequestMapping("/sm/rm/MenuCtl/storeMat")
	public ModelAndView storeMat(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String storageLoc = request.getParameter("storageLoc");
		mav.addObject("storageLoc", storageLoc);
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：直上高位料仓
	@RequestMapping("/sm/rm/MenuCtl/storeMat2Bin")
	public ModelAndView storeMat2Bin(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：高位料仓上料
	@RequestMapping("/sm/rm/MenuCtl/loadBin")
	public ModelAndView loadBin(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}
	
	// 菜单：领料
	@RequestMapping("/sm/rm/MenuCtl/loadManual")
	public ModelAndView loadManual(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String storageFilter = request.getParameter("storageFilter");
		String view = request.getParameter("view");
		mav.setViewName(view);
		mav.addObject("storageFilter", storageFilter);
		return mav;
	}

	// 菜单：退料
	@RequestMapping("/sm/rm/MenuCtl/undoMove")
	public ModelAndView undoMove(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：原料消耗
	@RequestMapping("sm/rm/MenuCtl/comsumeHis")
	public ModelAndView matConsume(HttpServletRequest request) {
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：料仓库存
	@RequestMapping("/sm/rm/MenuCtl/stockView")
	public ModelAndView stockView(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}
	
	// 菜单：料仓成分管理
	@RequestMapping("/sm/rm/MenuCtl/stockAnaMgr")
	public ModelAndView stockAnaMgr(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}

	// 菜单：料仓出入记录
	@RequestMapping("/sm/rm/MenuCtl/storageIoHis")
	public ModelAndView storageIoHis(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}
	
	// 菜单：料仓配置
	@RequestMapping("/sm/rm/stockConfig-Main")
	public ModelAndView configStock(HttpServletRequest request) {
		// 定义输出
		ModelAndView mav = new ModelAndView();
		String view = request.getParameter("view");
		mav.setViewName(view);
		return mav;
	}
	
}
